package com.bigknow.appstore.web.base.service.impl;

import com.bigknow.appstore.web.base.service.IDictService;
import com.bigknow.appstore.web.framework.service.BaseCRUDService;
import com.bigknow.appstore.web.base.dao.IDictDao;
import com.bigknow.appstore.web.base.entity.Dict;
import com.bigknow.appstore.web.base.entity.enums.State;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 约定凡是list为null的都不做删除和更新操作（Role）,凡是不为null的都做删除和更新
 */
@Service
public class DictService extends BaseCRUDService<Dict, IDictDao> implements IDictService {

    @Override
    public List<Dict> findByGroup(String group) {
        Dict dict = new Dict();
        dict.setGroup(group);
        dict.setState(State.ACTIVE);
        return this.dao.find(dict);
    }
}
